import tagRender from "@/components/aggridCellRenDerer/tagRender.vue";

const tableColumns = [
    {
        field: '',
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 50,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '调拨申请单号',
        field: 'requestTransferCode',
        width: 150,
    },
    {
        headerName: '申请公司',
        field: 'firm',
        width: 150,
    },
    {
        headerName: '客户',
        field: 'customer',
        width: 150,
    },
    {
        headerName: '原料编号',
        field: 'rawMaterialCode',
        width: 150,
    },
    {
        headerName: '原料名称',
        field: 'rawMaterialName',
        width: 150,
    },
    {
        headerName: '纱牌',
        field: 'yarnCard',
        width: 150,
    },
    {
        headerName: '纱批',
        field: 'yarnBatch',
        width: 150,
    },
    {
        headerName: '色号',
        field: 'colorCode',
        width: 150,
    },
    {
        headerName: '色称',
        field: 'colorName',
        width: 150,
    },
    {
        headerName: '等级',
        field: 'grade',
        width: 150,
    },
    {
        headerName: '生产所需件数',
        field: 'productionNeedNum',
        width: 150,
    },
    {
        headerName: '整件件数',
        field: 'zjjs',
        width: 150,
    },
    {
        headerName: '生产所需数量',
        field: 'productionNeedWeight',
        width: 150,
    },
    {
        headerName: '调拨申请件数',
        field: 'requestTransferNum',
        width: 150,
    },
    {
        headerName: '调拨申请数量',
        field: 'requestTransferWeight',
        width: 150,
    },
    {
        headerName: '所需日期',
        field: 'requestTransferTime',
        width: 150,
    },
    {
        headerName: '已完成数量',
        field: 'finishWeight',
        width: 150,
    },
    {
        headerName: '未完成数量',
        field: 'noFinishWeight',
        width: 150,
    },
    {
        headerName: '完结状态',
        field: 'finishState',
        width: 150,
        cellRenderer: tagRender,
        cellRendererParams: {
            styleClass: (params: any) => {
                return params.finishState == 0 ? 'info' : params.productionState == 1 ? 'success' : ''
            },
            text: (params: any) => {
                return params.finishState == 0
                    ? '未完成'
                    : params.finishState == 1
                        ? '已完成'
                        : ''
            },
            eltagSize: 0,
        },
    },
    {
        headerName: '备注',
        field: 'remark',
        width: 150,
    },
    {
        headerName: '创建人',
        field: 'createName',
        width: 150,
    },
    {
        headerName: '创建时间',
        field: 'createTime',
        width: 150,
    },
]

export default tableColumns